package com.bluedot.www.framework.ibatis.mybaits.sqlsession.defaults;


import com.bluedot.www.framework.ibatis.mybaits.confiuration.Configuration;
import com.bluedot.www.framework.ibatis.mybaits.sqlsession.SqlSession;
import com.bluedot.www.framework.ibatis.mybaits.sqlsession.SqlSessionFactory;

/**
 * 默认sqlSession工厂
 *
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/8/8 7:34
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {
    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
